Kinetis SDK Demo Applications User Guide  1.0.0-beta
Freescale Semiconductor, Inc.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
wdog_demo/src/main.c File Reference
#include <stdio.h>
#include "fsl_wdog_driver.h"
#include "fsl_gpio_driver.h"
#include "board.h"

Macros

#define SLOW_BLINK_TIME
 
#define FAST_BLINK_TIME
 

Functions

void set_busyled_Off ()
 
void set_busyled_on ()
 
void toggle_active_led ()
 
uint32_t is_key_pressed ()
 
void print_reset_reason ()
 Print chip reset reason. More...
 
void time_delay (uint32_t t)
 Delay some time. More...
 
void wdog_irq_handler (void)
 
void main (void)
 Watchdog main routine. More...
 

Macro Definition Documentation

#define FAST_BLINK_TIME
#define SLOW_BLINK_TIME

Function Documentation

uint32_t is_key_pressed ( )
void main ( void  )

Run a simple application which enables watchdog, then continuously refreshes the watchdog to prevent CPU reset Upon SW1 button push, the watchdog will expire after approximately 2 seconds and issue reset To debug, use the OpenSDA debugger connection to allow recovery after watchdog reset, this way the debug connection can be resumed after reset. Recovery not possible when debugging with JLink and powering through OpenSDA.

void print_reset_reason ( )

print chip reset reson to the terminal

void set_busyled_Off ( )
void set_busyled_on ( )
void time_delay ( uint32_t  t)

used to simulate the program's execution

Parameters
[in]tthe time that would be delayed
void toggle_active_led ( )
void wdog_irq_handler ( void  )